<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<%@include file="../../default.jsp"%>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/service/back/cmi_goods/cmi_goods_edit.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/service/back/cmi_goods/colorselector.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/ckfinder/ckfinder.js"></script>
<script type="text/javascript">
	var panel = '<%=webProperties.getPropertiesVal("web", "cmi_goods.goods_list.title") %>';
	document.title = panel;
	var urlPath = '<%=request.getContextPath()%>';
	var status = '${status}';
	var menuId = '${menuId == null ? "":menuId}';
</script>
<style type="text/css">
	.north {overflow:hidden; height: 30px;padding: 2px;border-bottom: 1px solid #fff;}
	.input {height: 16px;}	
	.button_ {border: 1px solid;cursor: pointer;margin-left: 5px;background: #F0F0F0;text-decoration: none;}
	.button_:HOVER{background: #DAE6FC;}
	.requre_field {color: red;margin-left: 5px;}
	#tab1-table th,#tab3-table th,#tab4-table th {font-size: 12px;font-family: "宋体";vertical-align: top;}
	.select_st{height:22px;border: 1px solid #99BBE8;width: 150px;}
	.strong {font-weight: bold;margin-right: 10px;}
</style>
</head>
<body class="easyui-layout" style="overflow-y: hidden;" scroll="no">
	<div id="goodsEdit">
		<iframe name="ifrName" src="" id="ifrName" style="display:none;"></iframe>
		<form  action="" method="POST"  id="fmName" name="fmName" enctype="multipart/form-data">
			<input type="hidden" name="st" id="st" value="">
			<input type="hidden" name="dt" id="dt" value="">
			<input type="hidden" name="file" id="file" value="">
		</form>
	</div>
	<div id="t2" region="center" split="false" border="false" style="background: #fff; overflow: hidden;display: block;">
		<div id="tabs" class="easyui-tabs"  fit="true" border="false" >
			<div id="Tab1" title="通用信息" closable="false" cache="false">
				<div id="colorSelect" style="z-index: 100;position:absolute;"></div>
				<table cellspacing="2" cellpadding="6" id="tab1-table" align="center">
					<tbody>
						<tr>
							<th align="right">商品名称:</th>
							<td align="left">
								<div style="float: left;">
									<input type="text" class="input" size="30" id="goodsName" name=goodsName style="width: 288px;" value="">
									<input id="goods_name_color" type="hidden" value="" name="goods_name_color">
									<input id="uuid" type="hidden"  name="uuid" value="">
								</div>
								<div id="font_color" onclick="ColorSelecter.Show(this);" style="background-color:;float:left;margin-left:2px;">
									<img style="margin-top:-1px;" border="0" src="<%=request.getContextPath()%>/web/themes/icons/color_selecter.gif">
								</div>
								<div style="float: left;">
									<select name="goodsNameFont">
				                      <option value="0">字体样式</option>
				                      <option value="strong">加粗</option>
									  <option value="em">斜体</option>
									  <option value="u">下划线</option>
									  <option value="strike">删除线</option>           
									</select>
				                    <label class="requre_field">*</label>
								</div>
							</td>
						</tr>
						<tr>
							<th align="right">商品货号：</th>
							<td align="left" >
								<input type="text"  maxlength="50" class="input" id="goodsBill" style="width: 288px;" value="">
								<div style="color:gray;">如果您不输入商品货号，系统将自动生成一个唯一的货号。</div>	
							</td>
						</tr>
						<tr>
							<th align="right">商品分类：</th>
							<td align="left" >
								<div style="float: left;">
									<select id="varietyId" class="select_st"></select>
									<input type="button" value="添加分类" onclick="showHideDiv('category_add',true);" class="button_">
								</div>
								<div style="float: left;margin-left: 10px;display: none;" id="category_add">
									<span>
				                       <input class="input" style="width: 128px;color: gray;" size="15" name="addedCategoryName" 
				                       onfocus="if (this.value == '请输入分类名称'){this.value='';this.style.color='#000';}"  
				                       value="请输入分类名称"/>
				                       <input type="button" value=" 确 定 " class="button_">
				                       <input type="button" value=" 隐 藏 " class="button_" onclick="showHideDiv('category_add',false);" >
				                     </span>
								</div>
								<label class="requre_field">*</label>
							</td>
						</tr>
						<tr>
							<th align="right">扩展分类：</th>
							<td align="left">
								<div style="float: left;"><input type="button" value=" 添 加  " class="button_" onclick="addExtendVariety();"></div>
								<div style="float: left;margin-left: 5px;" id="extendVarietys"> </div>
							</td>
						</tr>
						<tr>
							<th align="right">商品品牌：</th>
							<td align="left" >
								<div style="float: left;">
									<select name="brandId" id="brandId" class="select_st"></select>
									<input type="button" value="添加品牌" class="button_" onclick="showHideDiv('brand_add',true);">
								</div>
								<div style="float: left;margin-left: 10px;display: none;" id="brand_add">
									<span>
				                       <input class="input" style="width: 128px;color: gray;" size="15" name="addedBrandName" 
				                       onfocus="if (this.value == '请输入品牌名称'){this.value='';this.style.color='#000';}" 
				                       value="请输入品牌名称"/>
				                       <input type="button" value=" 确 定 " class="button_">
				                       <input type="button" value=" 隐 藏 " class="button_" onclick="showHideDiv('brand_add',false);">
				                     </span>
								</div>
							</td>
						</tr>
						<tr>
							<th align="right">本店售价：</th>
							<td align="left" >
								<input type="text" maxlength="10" id="salePrice" class="input" style="width: 288px;" value="">
								<input type="button" value="按市场价计算" class="button_">
							</td>
						</tr>
						<tr>
							<th align="right">会员价格：</th>
							<td align="left" >
								<span>
									注册用户<label id="">(100)</label>
									<input type="text"  maxlength="10" id="memberPrice" class="input" style="width: 100px;" value="-1">
								</span>
								<div style="color:gray;">会员价格为-1时表示会员价格按会员等级折扣率计算。你也可以为每个等级指定一个固定价格</div>	
							</td>
						</tr>
						<tr>
							<th align="right">商品优惠价格：</th>
							<td align="left" >
								<div>
									<a href="javascript:void(0)" onclick="addYh();">[+]</a>
									<span>优惠数量<input type="text"  size=8 id="s_yh_list_0" class="input" style="width: 100px;" value=""></span>
									<span>优惠价格<input type="text"  size=8 id="p_yh_list_0" class="input" style="width: 100px;" value=""></span>
								</div>
								<div id="subYh"></div>
								<div style="color:gray;">购买该商品时赠送消费积分数,-1表示按商品价格赠送</div>	
							</td>
						</tr>
						<tr>
							<th align="right">市场售价：</th>
							<td align="left" >
								 <input type="text"  id="marketPrice" maxlength="10" class="input" style="width: 288px;" value="">
								 <input type="button" value="取整数" class="button_" onclick="toInt('marketPrice');">
							</td>
						</tr>
		                <tr>
							<th align="right">赠送消费积分数：</th>
							<td align="left" >
								<input type="text" maxlength="10" class="input" id="saleScore" style="width: 288px;" value="-1">
								<div style="color:gray;">购买该商品时赠送消费积分数,-1表示按商品价格赠送</div>	
							</td>
						</tr>
						<tr>
							<th align="right">赠送等级积分数：</th>
							<td align="left" >
								<input type="text" maxlength="10" class="input" id="levelScore" style="width: 288px;" value="-1">
								<div style="color:gray;">购买该商品时赠送等级积分数,-1表示按商品价格赠送</div>	
							</td>
						</tr>
						<tr>
							<th align="right">积分购买金额：</th>
							<td align="left" >
								<input type="text" maxlength="10" class="input" id="scoreBy" style="width: 288px;" value="0">
								<div style="color:gray;">此处需填写金额)购买该商品时最多可以使用积分的金额</div>	
							</td>
						</tr>
						<tr>
							<th align="right"><input type = "checkbox" name="rate_ck" id="rate_ck" value="" >促销价：</th>
							<td align="left">
								<input type="text" class="input" maxlength="10" readonly="readonly" id="rate" style="width: 288px;background: gray;" value="0">
							</td>
						</tr>
						<tr>
							<th align="right">促销日期：</th>
							<td align="left" >
								 <input type="text"  id="rateStart" style="width: 130px;" value="">
								 <label style="width: 20px;"> 至 </label>
			                     <input type="text"  id="rateEnd" style="width: 130px;" value="">
							</td>
						</tr>
						 <tr>
							<th align="right">上传商品图片：</th>
							<td align="left" >
								<div><input type="file"  id="goodsImage_b"  name="goodsImage_b" style="width: 288px;" value="-1"></div>
								<div><input type="text"  id="goodsImage_b_input" style="width: 288px;color: gray;" class="input" 
								onfocus="if (this.value == '商品图片外部URL'){this.value='';this.style.color='#000';}" 
								value="商品图片外部URL"></div>
							</td>
						</tr>
						<tr>
							<th align="right">上传商品缩略图：</th>
							<td align="left" >
								<div><input type="file"  id="" style="width: 288px;"  value="-1"></div>
								<div><input type="text"  id="" style="width: 288px;color: gray;" class="input" 
								onfocus="if (this.value == '商品缩略图外部URL'){this.value='';this.style.color='#000';}" 
								value="商品缩略图外部URL"></div>
								<div><input type="checkbox" name="" value="" checked="checked">自动生成商品缩略图</input></div>
							</td>
						</tr>
					</tbody>
			</table>
			</div>
			<div id="Tab2" title="详细描述" closable="false" cache="false">
				<textarea id="content" name="content" rows="10" cols=""></textarea>
			</div>
			<div id="Tab3" title="其他信息" closable="false" cache="false">
				<table cellspacing="2" cellpadding="6" id="tab3-table" align="center">
					<tbody>
		              <tr>
							<th align="right" >商品重量:</th>
							<td align="left">
							<input type="text" class="input" maxlength="10" id="goodsWeight" style="width: 288px;" value="">
							<select name="goodsWeightUnit">
		                      <option value="1">千克</option>
		                      <option value="2">克</option>
							</select>
							</td>
						</tr>
		                <tr>
							<th align="right" >商品库存数量:</th>
							<td align="left">
							<input type="text" class="input" id="goodsSum" style="width: 288px;" value="1">
							<div style="color:gray;">库存在商品为虚货或商品存在货品时为不可编辑状态，库存数值取决于其虚货数量或货品数量</div>	
							</td>
						</tr>
						 <tr>
							<th align="right" >商品库存警告数量:</th>
							<td align="left">
							<input type="text" class="input" id="goodsWaring" style="width: 288px;" value="1">
							</td>
						</tr>
						 <tr>
							<th align="right" >加入推荐:</th>
							<td align="left">
							<input type="checkbox" name="goodsBetter" id="goodsBetter">精选
							<input type="checkbox" name="goodsNew" id="goodsNew">新品
							<input type="checkbox" name="goodsHot" id="goodsHot" value="">热销
							</td>
						</tr>
						 <tr>
							<th align="right">上架:</th>
							<td align="left">
							<input type="checkbox" name="goodsDm8" id="goodsDm8" checked="checked">打勾表示允许销售，否则不允许销售。
							</td>
						</tr>
						<tr>
							<th align="right" >能作为普通商品销售:</th>
							<td align="left">
							<input type="checkbox" name="gooodsDm1" id="gooodsDm1" checked="checked">打勾表示能作为普通商品销售，否则只能作为配件或赠品销售。
							</td>
						</tr>
						<tr>
							<th align="right" >是否为免运费商品:</th>
							<td align="left">
							<input type="checkbox" name="goodsFreeSend" id="goodsFreeSend">打勾表示此商品不会产生运费花销，否则按照正常运费计算。
							</td>
						</tr>
						<tr>
							<th align="right" >商品关键字:</th>
							<td align="left">
							<input type="text" class="input"  id="gooodsKey" style="width: 288px;" value="">用空格分隔
							</td>
						</tr>
						<tr>
							<th align="right" >商品简单描述:</th>
							<td align="left"><textarea rows="6" cols="31" id="goodsDesc" name="goodsDesc" style="width: 300px;"></textarea>
						</td>
						</tr>
						<tr>
							<th align="right" >商家备注：</th>
							<td align="left"><textarea rows="6" cols="31" id="factoryRemark" name="factoryRemark" style="width: 300px;"></textarea>
							<div style="color:gray;">仅供商家自己看的信息</div>
						</td>
						</tr>
		            </tbody>
		   		 </table>
			</div>
			<div id="Tab4" title="商品属性" closable="false" cache="false">
				<table cellspacing="2" cellpadding="6" id="tab4-table" align="center" id="goods_props">
					<tbody>
					<tr>
						<th align="right">商品类型:</th>
						<td align="left">
							<select name="categroyId" id="categroyId" class="select_st"></select>
		                    <div style="color:gray;">请选择商品的所属类型，进而完善此商品的属性</div>
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<table id="prop_list" cellspacing="2" cellpadding="6"></table>
						</td>
					</tr>
				</tbody>
			</table>
			</div>
			<div id="Tab5" title="商品相册" closable="false" cache="false">
				<div id="tab6-div" align="center" style="margin-top: 30px;">
					<div>
						<a href="javascript:;" onclick="addImg(this)">[+]</a>
						图片描述 <input type="text" name="img_desc[]" size="20" />
						上传文件 <input type="file" name="img_url[]" />
						 <input type="text" size="40" value="或者输入外部图片链接地址" style="color:#aaa;" 
						 onfocus="if (this.value == '或者输入外部图片链接地址'){this.value='http://';this.style.color='#000';}" name="img_file[]"/>
					</div>
				</div>
			</div>
			<div id="Tab6" title="关联商品" closable="false" cache="false">
				<table  id="linkgoods-table"  cellspacing="2"   cellpadding="6" align="center">
		          <tr>
		            <td colspan="3">
		              <select name="cat_id1">
						  <option value="0">所有分类</option>
						  <option value="1" >产品类别一</option>
						  <option value="2" >产品类别二</option>
						  <option value="3" >&nbsp;&nbsp;&nbsp;&nbsp;ff</option>
					  </select>
		              <select name="brand_id1">
						  <option value="0">所有品牌
						  <option value="2">test2</option>
						  <option value="1">test1</option>
					  </select>
		              <input type="text" name="keyword1" />
		              <input type="button" value=" 搜索 "  class="button" onclick="" />
		            </td>
		          </tr>
		          <tr>
		            <th>可选商品</th>
		            <th>操作</th>
		            <th>跟该商品关联的商品</th>
		          </tr>
		          <tr>
		            <td width="350px">
		              <select name="source_select1" size="20" style="width:100%" ondblclick="" multiple="true"></select>
		            </td>
		            <td align="center">
		              <p><input name="is_single" type="radio" value="1" checked="checked" />单向关联<br />
					  <input name="is_single" type="radio" value="0" />双向关联</p>
		              <p><input type="button" value=">>" onclick="" class="button" /></p>
		              <p><input type="button" value=">" onclick="" class="button" /></p>
		              <p><input type="button" value="<" onclick="" class="button" /></p>
		              <p><input type="button" value="<<" onclick="" class="button" /></p>
		            </td>
		            <td width="350px">
		              <select name="target_select1" size="20" style="width:100%" multiple="true" ondblclick=""></select>
		            </td>
		          </tr>
		        </table>
			</div>
			<div id="Tab7" title="配件" closable="false" cache="false">
				<table  id="groupgoods-table"  cellspacing="2"   cellpadding="6" align="center">
		          <tr>
		            <td colspan="3">
		             
		              <select name="cat_id1">
					  <option value="0">所有分类</option>
					  <option value="1" >产品类别一</option>
					  <option value="2" >产品类别二</option>
					  <option value="3" >&nbsp;&nbsp;&nbsp;&nbsp;ff</option>
					  </select>
		              <select name="brand_id1">
					  <option value="0">所有品牌
					  <option value="2">test2</option>
					  <option value="1">test1</option>
					  </select>
		              <input type="text" name="keyword1" />
		              <input type="button" value=" 搜索 "  class="button" onclick="" />
		            </td>
		          </tr>
		          <tr>
		            <th>可选商品</th>
		            <th>操作</th>
		            <th>该商品的配件</th>
		          </tr>
		          <tr>
		            <td width="350px">
		              <select name="source_select1" size="20" style="width:100%" ondblclick="" multiple="true">
		              </select>
		            </td>
		            <td align="center">
		              <p><div>价格</div><input type="text" value="" onclick=""  style="width: 50px;" /></p>
		              <p><input type="button" value=">" onclick="" class="button" /></p>
		              <p><input type="button" value="<" onclick="" class="button" /></p>
		              <p><input type="button" value="<<" onclick="" class="button" /></p>
		            </td>
		            <td width="350px">
		              <select name="target_select1" size="20" style="width:100%" multiple="true" ondblclick="">
		              </select>
		            </td>
		          </tr>
		        </table>
			</div>
			<div id="Tab8" title="关联文章" closable="false" cache="false">
				<table  id="article-table"  cellspacing="2"   cellpadding="6" align="center">
		          <tr>
		            <td colspan="3">
		              	文章标题<input type="text" name=""  style="width: 288px;"/>
		              <input type="button" value=" 搜索 "  class="button" onclick="" />
		            </td>
		          </tr>
		          <tr>
		            <th>可选文章</th>
		            <th>操作</th>
		            <th>跟该商品关联的文章</th>
		          </tr>
		          <tr>
		            <td width="350px">
		              <select name="source_select1" size="20" style="width:100%" ondblclick="" multiple="true"></select>
		            </td>
		            <td align="center">
		              <p><input type="button" value=">>" onclick="" class="button" /></p>
		              <p><input type="button" value=">" onclick="" class="button" /></p>
		              <p><input type="button" value="<" onclick="" class="button" /></p>
		              <p><input type="button" value="<<" onclick="" class="button" /></p>
		            </td>
		            <td width="350px">
		              <select name="target_select1" size="20" style="width:100%" multiple="true" ondblclick=""></select>
		            </td>
		          </tr>
		        </table>
			</div>
		</div>
	</div>
</body>
</html>
